package edu.sctu.practice.class02.yangyuran.assign03.assign3_03;

/**
 * Created by Administrator on 2015/10/24.
 */
public class CloneableCircle extends Circle implements Cloneable {
    private Name creator = new Name("Yong", "D", "Liang");

    public CloneableCircle(double radius) {
        super(radius);
    }

    public Name getCreator() {
        return creator;
    }

    public void setCreator(Name name) {
        creator = name;
    }

    public Object clone() {
        Object o = null;
        try {
            o = (CloneableCircle) super.clone();
        } catch (CloneNotSupportedException ex) {
            return null;
        }
        return o;
    }

    public String toString() {
        return super.toString() + " " + creator.getFullname();
    }
}
